﻿<%@ Page Language="C#" AutoEventWireup="false" Inherits="Bee.Web.BeePageView" %>

<%@ Import Namespace="Bee.Web" %>
<%@ Import Namespace="Bee" %>
<%@ Import Namespace="Bee.Util" %>
<%@ Import Namespace="System.Collections.Generic" %>
<% System.Data.DataTable dataTable = Model as System.Data.DataTable;  %>
<div class="topFormBar">
    <ul>
        <li><a class="button" href="javascript:" onclick="javascript:submit<%=PageId %>('content<%=PageId %>');">
            <span>转换</span> </a></li>
        <li><a class="button close" href="javascript:"><span>取消</span> </a></li>
    </ul>
</div>
<div class="pageFormContent">
    <form id="pageForm<%=PageId %>" action="/<%=ControllerName %>/Transfer.bee" method="post"
    class="required-validate">
    <div class="tabsContent">
        <dl class="nowrap">
            <dt>源连接字符串：</dt>
            <dd>
                <%=HtmlHelper.ForSelect("srcProvider", "DBProvider") %>
                <%=HtmlHelper.ForTextBox("srcConnection", "size=120")%>
            </dd>
        </dl>
        <dl class="nowrap">
            <dt>目标连接字符串：</dt>
            <dd>
                <%=HtmlHelper.ForSelect("targetProvider", "DBProvider") %>
                <%=HtmlHelper.ForTextBox("targetConnection", "size=120")%></dd>
        </dl>
    </div>
    </form>
    <div id="result<%=PageId %>">
    
    </div>
</div>

<script>

var timeout = null;
var submit<%=PageId %> = function()
{
    var form = $("#pageForm<%=PageId %>");
    bee.PostData(form.attr("action"), form.serializeArray(), function(){
        
         $("#result<%=PageId %>").loadUrl("/DBManager/ShowResult.bee");
         clearTimeout(timeout);
    });
    timeout = setTimeout("refreshResult()", 1000);
}

function refreshResult(){
    
    $("#result<%=PageId %>").loadUrl("/DBManager/ShowResult.bee", null, function(){
        if(timeout){
        timeout = setTimeout("refreshResult()", 1000);
        }
    });
}
</script>
